增强本地大语言模型智能体的 Linux 提权攻击能力
文章背景与核心概要
尽管基于云端的大语言模型(LLM)能够自主执行诸如 Linux 提权等渗透测试子任务,但它们带来了显著的安全、隐私和主权隐患。本地托管的开源权重模型虽然能缓解这些问题,但其历史表现较差——在标准化任务上的成功率仅为 8% 至 16%,远低于前沿云端模型。
本文深入探讨了小型语言模型(SLM)失效的根本原因,并测试了多种工程增强手段。研究人员通过在 hackingBuddyGPT 框架中评估思维链提示(chain-of-thought prompting)、检索增强生成(RAG)、结构化提示、历史压缩以及反思分析等技术,成功将 SLM(Llama 3.1 8B、Qwen 2.5 7B)的性能从 8% 提升至 67%。此外,全因子消融研究表明,漏洞发现(而非漏洞利用)仍然是本地模型的主要瓶颈,这为攻击性安全智能体的设计者和防御者提供了极具操作价值的洞察。
元数据与出版详情 (Metadata & Publication Details)
- arXiv 标识符: arXiv:2604.27143 [cs.CR]
- 研究学科: 密码学与安全 (
cs.CR);人工智能 (cs.AI) - 作者: Benjamin Probst, Andreas Happe, Jürgen Cito
- 提交日期: 2026年4月29日(最近修订:2026年8月12日)
- 会议 / 研讨会: 已被 RAISE 研讨会接受 (链接)
- DOI: 10.48550/arXiv.2604.27143
- arXiv Identifier: arXiv:2604.27143 [cs.CR]
- Subjects: Cryptography and Security (
cs.CR); Artificial Intelligence (cs.AI)- Authors: Benjamin Probst, Andreas Happe, Jürgen Cito
- Submission Date: April 29, 2026 (Last revised: August 12, 2026)
- Conference / Workshop: Accepted at the RAISE Workshop (Link)
- DOI: 10.48550/arXiv.2604.27143
摘要 (Abstract)
基于云端的大语言模型(LLM)可以执行诸如 Linux 提权等自主渗透测试子任务,但这也引发了安全、隐私和主权方面的担忧。本地托管的开源权重模型虽能避免这些问题,但以往的研究表明,小型开源模型在标准化提权任务上的成功率仅为 8% 至 16%,远低于前沿云端模型。
本文是一项关于小型模型为何在此任务中失败以及哪些工程技术能够弥补这一差距的实证研究。通过执行轨迹,我们提炼出了六种重复出现的失效模式,将每种模式映射到成熟的增强技术上,并在开源的 hackingBuddyGPT 框架中将其中五种技术(思维链提示、检索增强生成、结构化提示、历史压缩和反思分析)评估为可复现的扩展。
在一个统一的测试框架和匹配的条件下,我们评估的技术组合使两个 SLM(Llama 3.1 8B、Qwen 2.5 7B)在有引导的情况下的成功率从 8% 提升至 67%,媲美受引导的 GPT-4o。一个更大的开源参考模型(Llama 3.1 70B)达到了 83% 的成功率。全因子消融实验表明,基于反思的技术贡献最大,并揭示了漏洞发现(而非漏洞利用)是本地模型的主要制约因素。我们将这些成果作为可迁移的经验总结报告,旨在用于构建可靠的本地攻击性智能体并为防御者提供参考。
Cloud-based Large Language Models (LLMs) can perform autonomous penetration-testing sub-tasks such as Linux privilege escalation, but raise security, privacy, and sovereignty concerns. Locally hosted open-weight models avoid these issues, yet prior work reports that small open-weight models succeed on only 8–16% of standardized privilege-escalation tasks, far below frontier cloud models.
This paper is an empirical study of why small models fail at this task and which engineering techniques close the gap. From execution traces we distill six recurring failure modes, map each to an established enhancement technique, and evaluate five (chain-of-thought prompting, retrieval-augmented generation, structured prompting, history compression, and reflective analysis) as reproducible extensions to the open-source
hackingBuddyGPTframework.Under a single shared harness and matched conditions, the set of techniques we evaluate raise two SLMs (Llama 3.1 8B, Qwen 2.5 7B) from 8% to 67% with guidance, matching guided GPT-4o. A larger open-weight reference model (Llama 3.1 70B) reaches 83%. A full-factorial ablation shows that reflection-based techniques contribute most and reveals vulnerability discovery, not exploitation, as the main constraint for local models. We report these as transferable lessons for building reliable local offensive agents as well as to inform defenders.
访问全文与资源 (Access Full-Text & Resources)
许可证: 知识共享署名-相同方式共享 4.0 国际许可协议- 直接下载:
- 查看 PDF
- HTML 版本(实验性)
- TeX 源码
License: Creative Commons Attribution-ShareAlike 4.0 International
- Direct Downloads:
- View PDF
- HTML Version (Experimental)
- TeX Source